<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>登录页面</title>
    <link rel="stylesheet" href="__CSS__/bootstrap.min.css">
    <link rel="stylesheet" href="__CSS__/login.css">
</head>
<body>
<!--登录框-->
<div class="dialog-mask"></div>
<div class="dialog" id="login-window">

    <div class="dialog-wrap">
        <div class="dialog-inner clear">
            <form action="/userlogin" method="get" id="user_form">
                <div class="fl dialog-input">
                    <div class="dialog-title">极果帐号登录</div>
                    <div class="dialog-input-body">
                        <div class="dialog-input-arrow">
                            <label class="icon-input">
                                <i class="icon  icon-phone"></i>
                                <input type="text" placeholder="账号" name="userName">
                            </label>
                        </div>
                        <div class="dialog-input-arrow">
                            <label class="icon-input">
                                <i class="icon  icon-lock"></i>
                                <input type="text" placeholder="密码" name="password">
                            </label>
                        </div>
                        <div class="dialog-login-query">
                            <label>
                                <i class="icon icon-lock"> </i>
                                <input type="checkbox" value="1" name="savelogin">
                                下次自动登录
                            </label>
                            <div class="fr">
                                <a class="btn" href="javascript:;" id="window-login-submit">登录</a>
                            </div>
                        </div>
                        <div class="dialog-register-query">
                            <a href="/register" target="_blank">注册新账号</a>
                            <a href="/register" target="_blank" class="fr">忘记密码？</a>
                        </div>
                    </div>
                </div>
                <div class="fr dialog-other">
                    <div class="dialog-top-tips">社交网络账号登录</div>
                    <div class="dialog-erweima">
                        <img src="./static/img/home/jiguopp.png" alt="">
                        <img class="code-bg" src="./static/img/home/weixin-login-center-icon.png">

                    </div>
                    <div class="dialog-other-type">
                        <div class="small-icon-group">
                            <a href=""  class="icon icon-weibo"> 微博</a>
                            <a href="" class="icon icon-qq">QQ</a>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <script src="__JS__/jquery-v1.12.0.min.js"></script>
    <script>
        $("#window-login-submit").click(function(){
            var userName=$("input[name='userName']").val();
            var password=$("input[name='password']").val();
            $.ajax({
                type:"post",
                url:"/userlogin",
                data:{
                    'userName':userName,
                    'password':password
                },
                success:function (res) {
                    alert(res);
                }
            })
        })

    </script>

</div>
</body>
</html>